The trick of the mouse to rotate is that the rendering is rotated independently from the item itself.
As for the movement, unless I am mistaken, it's always moving "horizontally" with respect to the item rotation rotation. Much like when you are walking, you are going forward, when you rotate you still go forward but with a different angle than before.